<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>Insert title here</title>
<script type="text/javascript">
// NU MERGE(ILO FACI MAI TARZIU)
var isMouseDown = false ;
var x = 0;
var y = 0;

function onMove(ev)
{	if (isMouseDown == true)
		{
			if(ev.pageX || ev.pageY)
			{
				var locate = document.getElementById("move");		
				locate.style.position = "absolute";
				locate.style.top = (y + ev.pageY)+"px";
				locate.style.left = (x + ev.pageX)+"px";
				locate.style.display = "block";
				
				document.body.appendChild(locate);
			}	
		}
}
function onUp(ev)
{
	isMouseDown = true;
	if(ev.pageX || ev.pageY)
	{
		x = ev.pageX;
		y = ev.pageY;
	}
}

function onDown()
{
	isMouseDown = false;
}
</script>
<style type="text/css">
html,body 
{
	height: 100%;
	width: 100%;
}
</style>
</head>
<body onmousedown="onDown()" onmouseup="onUp()" onmousemove="onMove(event)">
<div style="border: 1px black solid; height: 30%; width: 20%; position: absolute;" id="move"></div>
</body>
</html>